import request from "@/utils/request";
import type {Response} from "@/type/ResponseType";
import type {DepartmentItem, RegistrationType} from "@/type/registrationType";


enum Enum {
    fetchHospitalRegistrationAPI = "/hosp/hospital",
    fetchHospitalDepartmentAPI = "/hosp/hospital/department"
}

/**
 * @description 获取医院预约挂号详情的接口
 * */
export const fetchHospitalRegistrationAPI = (hoscode: string) => request.get<RegistrationType, Response<RegistrationType>>(`${Enum.fetchHospitalRegistrationAPI}/${hoscode}`);

/**
 * @description 获取医院科室列表的接口
 * */
export const fetchHospitalDepartmentAPI = (hoscode: string) => request.get<DepartmentItem[], Response<DepartmentItem[]>>(`${Enum.fetchHospitalDepartmentAPI}/${hoscode}`);
